package router

import (
	"github.com/gin-gonic/gin"
	"h_rpcx/client/router/user"
	"h_rpcx/client/router/workbench"
)

type Router struct {
	users *user.User
	work  *workbench.WorkBench
}

func NewRouter() *Router {
	return &Router{
		users: user.NewUser(),
		work:  workbench.NewWorkbench(),
	}
}

//用户路由
func (r *Router) UerRouter(g *gin.Engine) {
	u := g.Group("user")
	{
		u.GET("/test", r.users.UserTest)
		u.GET("/banner", r.users.Banner)
	}
}

//工作台路由
func (r *Router) WorkbenchRouter(g *gin.Engine) {
	w := g.Group("/api/admin/workbench/index")
	{
		w.GET("/myArtist", r.work.MyArtist)
		w.GET("/thisMonthAdd", r.work.List)
	}
}
